import styles from "../index.module.less";
import { Col, Row } from "antd";
import { sexMap, statusMap } from "../../Table";

export default function Detail({ formInline }: any) {
  return (
    <div className={styles.detail}>
      <Row>
        <Col span={12}>
          <div className={styles.item}>
            <label className={styles.star}>用户名：</label>
            <span>{formInline.username}</span>
          </div>
        </Col>
        <Col span={12}>
          <div className={styles.item}>
            <label className={styles.star}>密码：</label>
            <span>{formInline.password}</span>
          </div>
        </Col>
      </Row>
      <Row>
        <Col span={12}>
          <div className={styles.item}>
            <label>状态：</label>
            <span>{statusMap[formInline.status]}</span>
          </div>
        </Col>
        <Col span={12}>
          <div className={styles.item}>
            <label>手机号：</label>
            <span>{formInline.phone}</span>
          </div>
        </Col>
      </Row>
      <Row>
        <Col span={12}>
          <div className={styles.item}>
            <label className={styles.star}>地址：</label>
            <span>{formInline.address}</span>
          </div>
        </Col>
        <Col span={12}>
          <div className={styles.item}>
            <label className={styles.star}>性别：</label>
            <span>{sexMap[formInline.sex]}</span>
          </div>
        </Col>
      </Row>
    </div>
  );
}
